package com.huawei.service;

public class StoneScissorCloth1 implements StoneScissorCloth{
    /**
     * @param person
     * @param computer
     * @Description: 石头剪刀布游戏规则
     * 对应人的输赢平，0-输，1-赢，2-平
     */

    @Override
    public int gameStandardOfPerson(int person, int computer) {
        //0-石头，1-剪刀，2-布
        int result = 0;
        switch (person){
            case 0:
                if(computer == 0){
                    result =2;
                    System.out.println("平局");
                }else if(computer == 1){
                    result = 1;
                    System.out.println("赢");
                } else if(computer == 2){
                    result = 0;
                    System.out.println("输");
                } else{
                    System.out.println("非法输出");
                }
                break;
            case 1:
                break;
            case 2:
                break;
            default:
        }
        return result;
    }
}
